package
{
	import com.bit101.components.ScrollBar;
	import com.bit101.components.Slider;
	import com.feng.components.FScrollBar;
	import com.feng.components.FScrollSlider;
	import com.feng.components.FSlider;
	
	import flash.display.Sprite;
	import flash.events.Event;
	
	import fla.ui.ScrollBarTest;
	import fla.ui.ScrollSliderTest;
	import fla.ui.SliderTest;

	public class TestScrollBar extends Sprite
	{
		public function TestScrollBar()
		{
			new ScrollBar(Slider.VERTICAL, this);
			
			var sliderTest:SliderTest = new SliderTest();
			
			addChild(sliderTest);
			
			var tHSlider:FSlider = FSlider.make(sliderTest.tHSlider, FSlider.HORIZONTAL);
			tHSlider.backClick = true;
			
			sliderTest.tHSlider.x = 40;
			
			var scrollSliderTest:ScrollBarTest = new ScrollBarTest();
			addChild(scrollSliderTest);
			
			var tScrollSlider:FScrollBar = FScrollBar.make(scrollSliderTest.tScrollBar, FSlider.VERTICAL);
			tScrollSlider.backClick = true;
			
			tHSlider.addEventListener(Event.CHANGE, function(event:Event):void
			{
				tScrollSlider.setThumbPercent(tHSlider.value / tHSlider.maximum);
				trace(tScrollSlider.value,tScrollSlider.minimum,tScrollSlider.maximum);
			});
			
			tScrollSlider.addEventListener(Event.CHANGE, function(event:Event):void
			{
				trace(tScrollSlider.value);
			});
		}
	}
}